import axios from 'axios'
import Qs from 'qs'
export function requestGet(config) {
  const instance = axios.create({
    baseURL: 'http://localhost:8080/',
    method: 'get'
  })
  return instance(config)

}
export function requestPost(config) {
  const instance = axios.create({
    baseURL: 'http://localhost:8080/',
    method: 'post',
    headers: {
      'deviceCode': 'A95ZEF1-47B5-AC90BF3'
    },
    transformRequest: [
      function(data) {
        return Qs.stringify(data);
      }
    ],
  })
  return instance(config)

}

